<div style="margin-bottom: 20px;">
    <form method="get" action="/oss/?r=guild/index&g=nws&p=testr&m=37">
        <input type="hidden" name="r" value="<{$beforeAction.Current.Route}>"/>
        <input type="hidden" name="m" value="<{$beforeAction.Current.MenuID}>"/>
        <input type="hidden" name="g" value="<{$beforeAction.Current.GameSrc}>"/>
        <input type="hidden" name="p" value="<{$beforeAction.Current.Platform}>"/>

        <div class="form-group">
            <label for="exampleInputFile">服务器</label>
            <select class="form-control" name="server">
                <{html_options options=$serverList selected=$server}>
            </select>
        </div>

        <div class="form-group">
            <label for="exampleInputFile">账号名称</label>
            <input type="text" class="form-control" name="search" value="<{$search}>">
        </div>

        <button class="btn btn-default btn-flat" type="submit">查询</button>
    </form>
</div>

<{if !empty($info)}>
    <{if $info.state}>
    <div class="box box-black">
        <div class="box-body">
            <ul class="nav nav-tabs">
                <{foreach from=$info.data key=key item=oneData name=foo}>
                <li class="ont-tab <{if $smarty.foreach.foo.index==0}> active<{/if}>" data-for="tb-<{$key}>"><a href="javascript:;"><{$oneData.roleName}></a></li>
                <{/foreach}>
            </ul>

            <{foreach from=$info.data key=key item=oneData name=foo}>
            <table id="tb-<{$key}>" class="info-table table table-bordered" <{if $smarty.foreach.foo.index>0}>style="display:none;"<{/if}>>
                <colgroup>
                    <col style="width: 10%;"></col>
                    <col style="width: 15%;"></col>
                    <col style="width: 10%;"></col>
                    <col style="width: 15%;"></col>
                    <col style="width: 10%;"></col>
                    <col style="width: 15%;"></col>
                    <col style="width: 10%;"></col>
                    <col style="width: 15%;"></col>
                </colgroup>
                <tr>
                    <th class="th-label-s">账号名称</th>
                    <td><{$oneData.accountName}></td>
                    <th class="th-label-s">角色ID</th>
                    <td><{$oneData.roleId}></td>
                    <th class="th-label-s">角色名称</th>
                    <td><{$oneData.roleName}></td>
                    <th class="th-label-s">职业</th>
                    <td><{$oneData.occupation}></td>
                </tr>

                <tr>
                    <th class="th-label-s">等级</th>
                    <td><{$oneData.nLevel}></td>
                    <th class="th-label-s">转生等级</th>
                    <td><{$oneData.bTransLv}></td>
                    <th class="th-label-s">PVP等级</th>
                    <td><{$oneData.bpvpLv}></td>
                    <th class="th-label-s">VIP等级</th>
                    <td><{$oneData.Vip}></td>
                </tr>

                <tr>
                    <th class="th-label-s">勾玉</th>
                    <td><{$oneData.iMoney}></td>
                    <th class="th-label-s">石币</th>
                    <td><{$oneData.iGold}></td>
                    <th class="th-label-s">珍珠</th>
                    <td><{$oneData.iConch}></td>
                    <th class="th-label-s">公平竞技场积分</th>
                    <td><{$oneData.FairScore}></td>
                </tr>

                <tr>
                    <th class="th-label-s">渠道</th>
                    <td><{$oneData.plat}></td>
                    <th class="th-label-s">GM权限</th>
                    <td><{$oneData.iGMPower}></td>
                    <th class="th-label-s">是否封禁</th>
                    <td><{$oneData.bBlockCode}></td>
                    <th class="th-label-s">封禁原因</th>
                    <td><{$oneData.bBlockChatReason}></td>
                </tr>

                <tr>
                    <th class="th-label-s">是否在线</th>
                    <td><{$oneData.isOnline}></td>
                    <th class="th-label-s">设备号</th>
                    <td><{$oneData.Imei}></td>
                    <th class="th-label-s">当前主线ID</th>
                    <td><{$oneData.CurQuestId}></td>
                    <th class="th-label-s"></th>
                    <td></td>
                </tr>

                <tr>
                    <th class="th-label-s">创建角色时间</th>
                    <td><{$oneData.iCreateTime}></td>
                    <th class="th-label-s">最后登录时间</th>
                    <td><{$oneData.dwLastLogInTime}></td>
                    <th class="th-label-s"></th>
                    <td></td>
                    <th class="th-label-s"></th>
                    <td></td>
                </tr>

            </table>
            <{/foreach}>
        </div>
    </div>


    <{else}>
    <div class="alert alert-warning" style="margin:0;" role="alert"><{$info.msg}></div>
    <{/if}>
    <{/if}>

<script>
    $(function(){
        $(".ont-tab").click(function(){
            if(!$(this).hasClass('active')) {
                $(".ont-tab").removeClass('active');
                $(this).addClass('active');

                $(".info-table").hide();
                $("#" + $(this).attr('data-for')).show();
            }
        });
    });
</script>